package com.repair.worker.exception;

import com.repair.base.exception.ErrorCode;

/**
 * Created by IntelliJ IDEA.
 *
 * @author zq
 * @version 1.0
 * @create 2024-11-07 19:22
 * @since jdk1.8
 */
public enum WorkerServiceErrorCode implements ErrorCode {
    /**
     * 昵称已经存在
     */
    WORKER_NICKNAME_EXISTS(7101, "昵称已经存在"),
    CAPTCHA_TOO_MANY_REQUESTS(7002, "验证码发送频率过高，稍后再试"),
    WORKER_EXISTS(7003, "用户已存在"),
    WORKER_NOT_EXISTS(7004, "用户不存在");

    private final Integer code;
    private final String message;

    WorkerServiceErrorCode(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public Integer getCode() {
        return this.code;
    }

    @Override
    public String getMessage() {
        return this.message;
    }
}
